//
//  PLAlertAction.h
//
//  Created by KimmanYip on 2017/12/8.
//

/*
 * 弹框Action
 */

#import <Foundation/Foundation.h>

typedef void(^PLAlertActionBlock)(void);

typedef NS_ENUM(NSUInteger, PLAlertActionStyle) {
    PLAlertActionStyleDefault = 0,
    PLAlertActionStyleCancel
};

@interface PLAlertAction : NSObject

/** 标题 */
@property (nonatomic, copy, nullable, readonly) NSString *title;
/** 类型 */
@property (nonatomic, assign, readonly) PLAlertActionStyle style;
/** 事件 */
@property (nonatomic, copy, nullable,) PLAlertActionBlock handler;

/**
 初始化

 @param title 标题
 @param style 类型
 @param handler 事件
 */
- (instancetype _Nonnull )initWithTitle:(nullable NSString *)title
                                  style:(PLAlertActionStyle)style
                                handler:(PLAlertActionBlock _Nullable )handler;

@end
